package work5;

import transaction.TransactionManager;

import java.util.Random;

public class GaphicProxy implements Graphic {
    private Graphic graphic;
    public GaphicProxy(Graphic graphic){
        this.graphic=graphic;
    }
    @Override
    public void Draw() {
//        graphic.Draw();
        Random rand =new Random();
        if(rand.nextBoolean()){
            System.out.println("大吉大利！！");
            graphic.Draw();
        }else {
            System.out.println("今晚吃鸡！！");
        }
    }
}
